package com.robot.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.robot.dao.entity.RobotKnowledge;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface RobotKnowledgeMapper extends BaseMapper<RobotKnowledge> {

    @Insert("insert into robot_knowledge (robot_id, knowledge_id, create_time, update_time) VALUES (#{robotId}, #{knowledgeId}, #{createTime}, #{updateTime})")
    void create(RobotKnowledge robotKnowledge);

    void deleteByRobotIdAndKnowledgeId(Long robotId, Long knowledgeId);


    List<Long> selectKnowledgeIdsByRobotId(@Param("robotId") Long robotId);


//    @Insert()
//    void create(Long robotId, Long knowledgeId);
}
